Kotlin 1.3.0 added the ability to mark the main() function with suspend. Kotlin will wrap it in a suitable coroutine builder, and you can call other suspend functions from main() without your own coroutine builder.

Most of the samples on this site will use a manually-created coroutine builder, though. While everything in the Klassbook centers around main(), very little "real world" code does, and your choice of coroutine builder and coroutine scope are fairly important.

You can learn more about this in:
Tags:
Run Edit